$OpenBSD: patch-libraries_Cabal_Cabal_Distribution_Simple_Setup_hs,v 1.3 2014/11/22 20:23:23 kili Exp $
--- libraries/Cabal/Cabal/Distribution/Simple/Setup.hs.orig	Thu Jul 10 06:34:21 2014
+++ libraries/Cabal/Cabal/Distribution/Simple/Setup.hs	Sun Nov  2 21:50:32 2014
@@ -905,6 +905,7 @@ data RegisterFlags = RegisterFlags {
     regGenPkgConf  :: Flag (Maybe FilePath),
     regInPlace     :: Flag Bool,
     regDistPref    :: Flag FilePath,
+    regPkgPath     :: Flag String,
     regVerbosity   :: Flag Verbosity
   }
   deriving Show
@@ -916,6 +917,7 @@ defaultRegisterFlags = RegisterFlags {
     regGenPkgConf  = NoFlag,
     regInPlace     = Flag False,
     regDistPref    = Flag defaultDistPref,
+    regPkgPath     = Flag "",
     regVerbosity   = Flag normal
   }
 
@@ -953,6 +955,11 @@ registerCommand = makeCommand name shortDesc longDesc
          "instead of registering, generate a package registration file"
          regGenPkgConf (\v flags -> flags { regGenPkgConf  = v })
          (optArg' "PKG" Flag flagToList)
+
+      ,option "" ["pkgpath"]
+	 "set the pkgpath field"
+	 regPkgPath (\v flags -> flags { regPkgPath = v })
+	 (reqArgFlag "PKGPATH")
       ]
 
 unregisterCommand :: CommandUI RegisterFlags
@@ -991,6 +998,7 @@ instance Monoid RegisterFlags where
     regGenPkgConf  = mempty,
     regInPlace     = mempty,
     regDistPref    = mempty,
+    regPkgPath     = mempty,
     regVerbosity   = mempty
   }
   mappend a b = RegisterFlags {
@@ -999,6 +1007,7 @@ instance Monoid RegisterFlags where
     regGenPkgConf  = combine regGenPkgConf,
     regInPlace     = combine regInPlace,
     regDistPref    = combine regDistPref,
+    regPkgPath     = combine regPkgPath,
     regVerbosity   = combine regVerbosity
   }
     where combine field = field a `mappend` field b
